<template>
    <div id="app">
        <router-view class="viewContainer scrollYContainer"></router-view>
    </div>
</template>

<script>
    export default {
        name: 'app',
        mounted() {
            this.rem();
            this.getAgent()
        },
        methods: {
            rem() {
                (function (win, doc) {
                    // 设计稿宽度750px，浏览器iphone8宽度是375px，1rem=100px，所以设置基数为 2*100
                    function change() {
                        doc.documentElement.style.fontSize = doc.documentElement.clientWidth / 375 * 37.5 + 'px'
                    }

                    change()
                    win.addEventListener('resize', change, false)
                    win.addEventListener('orientationchange', change, false) // 横纵向旋转
                })(window, document)
            },
            // 获取系统版本号
            getAgent() {
                var userAgent = navigator.userAgent;
                var index = userAgent.indexOf("Android")
                if (index > -1) {
                    let androidVersion = parseFloat(userAgent.slice(index + 8));
                    window.sessionStorage.setItem('userAgent', androidVersion < 4.5 ? 0 : 1)
                }
            },
        }
    }
</script>

<style lang="less">
    @import '~vux/src/styles/reset.less';
    @import "../static/css/common.css";

    body {
        height: 100%;
        background-color: #fbf9fe;

        .pages {

        }
    }

    .item-btns {
        text-align: right;

        .item-btn {
            margin-right: 10px;
        }

        .icon {
            width: 16px;
            height: 16px;
            display: inline-block;
            background-repeat: no-repeat;
            background-position: center;
            vertical-align: middle;
        }
    }

    input:-webkit-autofill,
    textarea:-webkit-autofill,
    select:-webkit-autofill {
        outline: 0 none !important;
        -webkit-box-shadow: 0 0 0 1000px white inset;
    }

    select {
        /*重置Chrome和Firefox的select边框样式*/
        border: none;
        /*清除默认的select选择框样式*/
        appearance: none;
        -moz-appearance: none;
        -webkit-appearance: none;
        background-color: #fff;
        outline: 0 none !important;
        direction: rtl;
    }

    /*清除IE的默认选择框样式，隐藏下拉箭头*/
    select::-ms-expand {
        display: none;
    }

    .btn-next-block {
        z-index: 181;
        width: 90%;
        margin-top: 1rem;
        padding: 0 5%;

        .btn-next {
            width: 100%;
        }
    }

    .item-info {
        background-color: #fff;
        line-height: 1rem;

        .item-item {
            border-bottom: 1px solid #f4f4f4;
        }

        .weui-cell {
            padding: 0 15px !important;
        }

        .weui-input {
            border: none !important;
            text-align: right !important;
        }
    }

    .weui-cell__ft {
        display: none !important;
    }

    .vux-datetime, .weui-cell_switch {
        .weui-cell__ft {
            color: #000 !important;
            display: inline-block !important;
        }
    }

    .weui-label {
        font-size: .4rem !important;
    }

    .weui-cells__title {
        color: #000 !important;
    }

    .vux-no-group-title {
        margin-top: 0 !important;
    }

    .vux-cell-value {
        color: #000 !important;
    }

    .weui_icon_clear {
        display: none !important;
    }
</style>


